package com.mouse.remind;


import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.widget.Toast;


public class TipWinShow {
	
	public static ProgressDialog getProgressDialog(Context activity)
	{   
		ProgressDialog progressDialog;
	
		progressDialog = new ProgressDialog(activity);
		progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
		//progressDialog.setTitle("");
		progressDialog.setMessage("正在加载中...");
		progressDialog.setCancelable(true);
		progressDialog.setCanceledOnTouchOutside(false);
		/*progressDialog.setButton("", new DialogInterface.OnClickListener()
		{
			public void onClick(DialogInterface dialog, int whichButton)
			{

			}
		});
		progressDialog.setButton2("", new DialogInterface.OnClickListener()
		{
			public void onClick(DialogInterface dialog, int whichButton)
			{

			}
		});*/
		return progressDialog;
	}
	
	public static void showAlertDialog(Activity activity, String msg, DialogInterface.OnClickListener positiveListener)
	{
		AlertDialog alertDialog;
		
		Builder builder = new AlertDialog.Builder(activity);
		builder.setTitle("评分确认！");
		builder.setMessage(msg);
		builder.setPositiveButton("确  定", positiveListener);
		builder.setNegativeButton("取  消", null);
		alertDialog = builder.create();
		alertDialog.show();
	}
	
	public static void showNetToast(Context context){
		Toast.makeText(context, "网络链接失败，请稍后重试！", Toast.LENGTH_SHORT).show();
	}
	
	public static void showNoDataToast(Context context){
		Toast.makeText(context, "暂时无数据！", Toast.LENGTH_SHORT).show();
	}
	
	public static void showUploadFailToast(Context context){
		Toast.makeText(context, "加载数据失败！", Toast.LENGTH_SHORT).show();
	}
	
	public static void showUploadSucToast(Context context){
		Toast.makeText(context, "上传数据成功！", Toast.LENGTH_SHORT).show();
	}
}
